import Mock from 'mockjs'

export function getHomeData() {
  return {
    "msg": 'data from Mock',
    "data": {
      //下面是自己模拟的orderinfo
      orderInfo: [
        {
          totalPrice: Mock.Random.integer(2000, 3000),
          title: '今日支付订单',
          icon: 'chenggong',
          color: '#2ec7c9'
        },
        {
          totalPrice: Mock.Random.integer(60000, 120000),
          title: '本月支付订单',
          icon: 'chenggong',
          color: '#2ec7c9'
        },
        {
          totalPrice: Mock.Random.integer(20, 100),
          title: '今日收藏数量',
          icon: 'shoucang',
          color: '#ffb980'
        },
        {
          totalPrice: Mock.Random.integer(600, 1000),
          title: '本月收藏数量',
          icon: 'shoucang',
          color: '#ffb980'
        },
        {
          totalPrice: Mock.Random.integer(100, 300),
          title: '今日未支付订单',
          icon: 'quxiao',
          color: '#5ab1ef'
        },
        {
          totalPrice: Mock.Random.integer(3000, 10000),
          title: '本月未支付订单',
          icon: 'quxiao',
          color: '#5ab1ef'
        },
      ],
      //下面是第一个折线图的orderData，改名为sale
      saleData: {
        //视频中为14组对象数据？不清楚为什么要十四组
        selldata: [
          {
            Vue: Mock.Random.float(1000, 10000, 0, 2),
            JavaScript: Mock.Random.float(1000, 10000, 0, 2),
            uniapp: Mock.Random.float(1000, 10000, 0, 2),
            "Node.js": Mock.Random.float(1000, 10000, 0, 2),
            React: Mock.Random.float(1000, 10000, 0, 2),
            wechat: Mock.Random.float(1000, 10000, 0, 2),
          },
          {
            Vue: Mock.Random.float(1000, 10000, 0, 2),
            JavaScript: Mock.Random.float(1000, 10000, 0, 2),
            uniapp: Mock.Random.float(1000, 10000, 0, 2),
            "Node.js": Mock.Random.float(1000, 10000, 0, 2),
            React: Mock.Random.float(1000, 10000, 0, 2),
            wechat: Mock.Random.float(1000, 10000, 0, 2),
          },
          {
            Vue: Mock.Random.float(1000, 10000, 0, 2),
            JavaScript: Mock.Random.float(1000, 10000, 0, 2),
            uniapp: Mock.Random.float(1000, 10000, 0, 2),
            "Node.js": Mock.Random.float(1000, 10000, 0, 2),
            React: Mock.Random.float(1000, 10000, 0, 2),
            wechat: Mock.Random.float(1000, 10000, 0, 2),
          },
          {
            Vue: Mock.Random.float(1000, 10000, 0, 2),
            JavaScript: Mock.Random.float(1000, 10000, 0, 2),
            uniapp: Mock.Random.float(1000, 10000, 0, 2),
            "Node.js": Mock.Random.float(1000, 10000, 0, 2),
            React: Mock.Random.float(1000, 10000, 0, 2),
            wechat: Mock.Random.float(1000, 10000, 0, 2),
          },
          {
            Vue: Mock.Random.float(1000, 10000, 0, 2),
            JavaScript: Mock.Random.float(1000, 10000, 0, 2),
            uniapp: Mock.Random.float(1000, 10000, 0, 2),
            "Node.js": Mock.Random.float(1000, 10000, 0, 2),
            React: Mock.Random.float(1000, 10000, 0, 2),
            wechat: Mock.Random.float(1000, 10000, 0, 2),
          },
          {
            Vue: Mock.Random.float(1000, 10000, 0, 2),
            JavaScript: Mock.Random.float(1000, 10000, 0, 2),
            uniapp: Mock.Random.float(1000, 10000, 0, 2),
            "Node.js": Mock.Random.float(1000, 10000, 0, 2),
            React: Mock.Random.float(1000, 10000, 0, 2),
            wechat: Mock.Random.float(1000, 10000, 0, 2),
          },
          {
            Vue: Mock.Random.float(1000, 10000, 0, 2),
            JavaScript: Mock.Random.float(1000, 10000, 0, 2),
            uniapp: Mock.Random.float(1000, 10000, 0, 2),
            "Node.js": Mock.Random.float(1000, 10000, 0, 2),
            React: Mock.Random.float(1000, 10000, 0, 2),
            wechat: Mock.Random.float(1000, 10000, 0, 2),
          },
        ],
        selltime: [
          '20211011', '20211012', '20211013', '20211014', '20211015', '20211016', '20211017'
        ]
      },
      //下面是饼图，视频数据
      videoData: [
        {
          name: 'wechat',
          value: Mock.Random.float(1000, 10000, 0, 2)
        },
        {
          name: 'JS',
          value: Mock.Random.float(1000, 10000, 0, 2)
        },
        {
          name: 'uniapp',
          value: Mock.Random.float(1000, 10000, 0, 2)
        },
        {
          name: 'Node.js',
          value: Mock.Random.float(1000, 10000, 0, 2)
        },
        {
          name: 'React',
          value: Mock.Random.float(1000, 10000, 0, 2)
        },
        {
          name: 'VUE',
          value: Mock.Random.float(1000, 10000, 0, 2)
        },
      ],
      //下面是表单数据
      tableData: [
        {
          name: 'Vue',
          todayBuy: Mock.Random.float(500, 800, 0, 2),
          monthBuy: Mock.Random.float(10000, 20000, 0, 2),
          totalBuy: Mock.Random.float(100000, 300000, 0, 2)
        },
        {
          name: 'JavaScript',
          todayBuy: Mock.Random.float(500, 800, 0, 2),
          monthBuy: Mock.Random.float(10000, 20000, 0, 2),
          totalBuy: Mock.Random.float(100000, 300000, 0, 2)
        },
        {
          name: 'uniapp',
          todayBuy: Mock.Random.float(500, 800, 0, 2),
          monthBuy: Mock.Random.float(10000, 20000, 0, 2),
          totalBuy: Mock.Random.float(100000, 300000, 0, 2)
        },
        {
          name: 'Node.js',
          todayBuy: Mock.Random.float(500, 800, 0, 2),
          monthBuy: Mock.Random.float(10000, 20000, 0, 2),
          totalBuy: Mock.Random.float(100000, 300000, 0, 2)
        },
        {
          name: 'React',
          todayBuy: Mock.Random.float(500, 800, 0, 2),
          monthBuy: Mock.Random.float(10000, 20000, 0, 2),
          totalBuy: Mock.Random.float(100000, 300000, 0, 2)
        },
        {
          name: '小程序',
          todayBuy: Mock.Random.float(500, 800, 0, 2),
          monthBuy: Mock.Random.float(10000, 20000, 0, 2),
          totalBuy: Mock.Random.float(100000, 300000, 0, 2)
        },
      ],
      //下面是bar图，用户数据
      userData: {
        time: [
          '周一', '周二', '周三', '周四', '周五', '周六', '周日'
        ],
        num: [
          {
            '新增用户': Mock.Random.integer(10, 100),
            '活跃用户': Mock.Random.integer(40, 400),
          },
          {
            '新增用户': Mock.Random.integer(10, 100),
            '活跃用户': Mock.Random.integer(40, 400),
          },
          {
            '新增用户': Mock.Random.integer(10, 100),
            '活跃用户': Mock.Random.integer(40, 400),
          },
          {
            '新增用户': Mock.Random.integer(10, 100),
            '活跃用户': Mock.Random.integer(40, 400),
          },
          {
            '新增用户': Mock.Random.integer(10, 100),
            '活跃用户': Mock.Random.integer(40, 400),
          },
          {
            '新增用户': Mock.Random.integer(10, 100),
            '活跃用户': Mock.Random.integer(40, 400),
          },
          {
            '新增用户': Mock.Random.integer(10, 100),
            '活跃用户': Mock.Random.integer(40, 400),
          },
        ]
      }
    }
  }
}
